package com.yuyue.note01.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

//使用@ Controller 定义 controller
@Controller
public class MyController {

    //设置访问路径
    @RequestMapping("/save")
    //设置返回值类型
    @ResponseBody
    public String save(){
        System.out.println("浏览器调用执行了保存方法！");
        return "{'module' : 'spring mvc''}";
    }
}
